import torch
import numpy as np
import matplotlib.pylab as plt
a=np.array([1,1,3,4,4])
b=a

aa=torch.from_numpy(a).unsqueeze(0)
bb=torch.from_numpy(b).unsqueeze(1)
print(f'-------------')
print(aa)
print(f'-------------')
print(bb)
print(aa.shape,bb.shape)
dd=aa-bb
print(dd)
print(dd.shape)
plt.matshow(dd[:,:])
plt.savefig('1.jpg')
plt.show()